/**
 * Created by yulong on 14-7-30.
 */
function Circle() {
    createjs.Shape.call(this);

    //设置类型代码
    this.TYPE_TEST = 0;
    this.TYPE_UNSELECTED = 1;
    this.TYPE_SELECTED = 2;
    this.TYPE_CURCAT = 3;
    this.TYPE_MID = 4;

    //初始化元素值
    this.init = function() {
        this.FVAL = 0;
        this.GVAL = 0;
        this.HVAL = 0;
        this.MIN_PATH = 0;
        this.MIN_PATG_COUNT = 0;
        this.PARENT = [];
    }

    //获取最短路径元素数
    this.getMinPathCount = function() {
        return this.MIN_PATG_COUNT;
    }
    //获取最短路径数组
    this.getMinPath = function() {
        return this.MIN_PATH;
    }

    //设置圆的类型
    this.setCircleType = function(type) {
        this._circleType = type;
        switch (type) {
            case this.TYPE_TEST:
                this.setColor('#ff0000');
                break;
            case this.TYPE_UNSELECTED:
                this.setColor('#cccccc');
                break;
            case this.TYPE_SELECTED:
                this.setColor('#ff6600');
                break;
            case this.TYPE_CURCAT:
                this.setColor('#0000ff');
                break;
            case this.TYPE_MID:
                this.setColor('#335aa4');
                break;
            default :
                this.setColor('#cccccc');
                break;
        }
    }

    //设置圆的颜色
    this.setColor = function(colorString) {
        this.graphics.beginFill(colorString);
        this.graphics.drawCircle(0, 0, 25);
        this.graphics.endFill();
    }

    //获取圆的类型
    this.getCircleType = function() {
        return this._circleType;
    }

    //默认类型
    this.init();
    this.setCircleType(this.TYPE_UNSELECTED);
}
Circle.prototype = new createjs.Shape();
